cmake_minimum_required(VERSION 3.14)

project(cmake-vcpkg-analyzer LANGUAGES CXX VERSION 0.0.3)

include(cmake/SparkWithGit.cmake)
spark_initialize_modules()

# 资源文件路径
set(QRC_SOURCES "")

spark_add_executable_path(${PROJECT_NAME} 
    src
    src/config
    src/dialog
    ${QRC_SOURCES}
)
target_link_qt(${PROJECT_NAME})

spark_framework_include_with_git(${PROJECT_NAME} 
    https://gitee.com/spark-framework-libs/spark-framework-features
    FEATURES version screenutil)


if(WIN32)
    # Windows 下为目标追加图标资源与目标属性
    target_sources(${PROJECT_NAME} PRIVATE icon.rc)
    set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE)
    return()
endif(WIN32)

# 测试用例组
add_subdirectory(tests)

if(CMAKE_SYSTEM_NAME MATCHES "Linux")
    include(CMakeLists.txt.linux)
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
